package com.youku.util;

import java.io.IOException;

import org.codehaus.jackson.map.ObjectMapper;

public class JsonHelper {
	
	private static final ObjectMapper mapper;

	static {
		mapper = new ObjectMapper();
	}

	public static String toJsonString(Object object) {
		try {
			return mapper.writeValueAsString(object);
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}
}
